package com.aurora.oa.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.widget.Toast;

import com.aurora.oa.login.view.ActivityLogin;

/**
 * Created by Administrator on 2017/4/17 0017.
 */
public class BootCompletReceive extends BroadcastReceiver {
    private static final String BOOT_COMPLETED =
            "android.intent.action.BOOT_COMPLETED";
    public static final String CONNECTIVITY_CHANGE_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";

    @Override
    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context, "qdwc！", Toast.LENGTH_SHORT).show();
        if(BOOT_COMPLETED.equals(intent.getAction())){
/*            Intent i = new Intent(context, ActivityLogin.class);
            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(i);*/
/*            IntentFilter filter = new IntentFilter();
            filter.addAction(CONNECTIVITY_CHANGE_ACTION);
            filter.setPriority(1000);
            context.registerReceiver(new NetworkStateChangeReceiver(), filter);*/
        }
    }
}


